<template>
    <transition :name="transition">
      <router-view></router-view>
    </transition>
</template>
<script>
  import './assets/js/h5Common.js'
  import {getParameterByName} from './assets/js/utils.js'
	export default{
		name: 'repaircontainer',
    mounted () {
        this.$nextTick(() => {
          document.getElementsByTagName('html')[0].style.fontSize = window.innerWidth / 10 + 'px';
        })
    },
    data(){
        return{
          transition: ''
        }
    },
    watch:{
      '$route'(to, from){
        if(!to.meta) this.transition = '';
        else if(to.meta.transition === 'fromBottom') this.transition = 'slideInBottom';
        else if(from.meta.transition === 'fromBottom') this.transition = 'slideOutBottom';
      }
    }
	}
</script>
<style lang='less' scoped>
  .slideInBottom-enter,
  .slideOutBottom-leave-active{
      transform: translateY(100%);
  }
</style>
